import store from "@/store/index";
/**
 * api接口 type: 1
 */
import {
  get,
  post
} from "./axios";



/**
 * 返回当前年月日的前一天
 * @returns {string}
 */
function getDate(params) {
  var date = new Date();
  var year = date.getFullYear();
  var month = date.getMonth() + 1;
  var day = date.getDate() - 1;
  if (month < 10) {
    month = "0" + month;
  }
  if (day < 10) {
    day = "0" + day;
  }
  let nowDate = year - params + month + day;
  return nowDate;
}